<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>走访登记</title>
    <link href="/static/css/layout.css" rel="stylesheet" type="text/css"/>
    <link href="/static/css/cb.css" rel="stylesheet" type="text/css"/>
    <link href="/static/css/n.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" type="text/css"
          href="/static/easyui/themes/default/easyui.css"/>
    <link rel="stylesheet" type="text/css" href="/static/easyui/themes/icon.css"/>
    <link rel="stylesheet" type="text/css" href="/static/easyui/demo/demo.css"/>
    <link rel="stylesheet" type="text/css"
          href="/static/js/laypage/skin/laypage.css"/>

    <script type="text/javascript" src="/static/easyui/jquery.min.js"></script>
    <script src="/static/js/vue/vue.min.js" charset="utf-8"></script>
    <script type="text/javascript" src="/static/easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/static/js/laypage/laypage.js"></script>
    <script type="text/javascript" src="/static/laydate/laydate.js"></script>
</head>
<body>
<table width="690px" height="350px" border="0" align="center"
       cellpadding="3" cellspacing="1" bgcolor="#AEDEF4" id="app1">
    <tr>
        <td align="center" bgcolor="#E2F7FE">
            <form id="form3" name="form3" method="post" action="">
                <table width="80%" border="0" cellspacing="1" cellpadding="3">
                    <tr style="height: 30px">
                        <td width="20%" align="center"><strong>矫正单位:</strong></td>
                        <td width="20%" align="left"><select style="width: 170px; height: 30px" id="job"
                                                             onchange="changeDept()">
                            <option>请选择矫正单位</option>
                        <#list job as u>
                            <option value="${u.id}">${u.name}</option></#list></select></td>
                        <td width="15%" align="right"><strong>走访人员姓名:</strong></td>
                        <td width="25%" align="left">
                            <select style="width: 176px; height: 30px" name="perid">
                                <option v-for="item in result" v-bind:value="item.perid">{{item.pname}}</option>
                            </select></td>
                        </select></td>
                    </tr>
                    <tr style="height: 30px">
                        <td width="20%" align="center"><strong>矫正人员:</strong></td>
                        <td width="20%" align="left">
                            <select style="width: 170px; height: 30px" name="pid" id="addunit">
                                <option>请选择矫正人员</option>
                                <option v-for="n in result1" v-bind:value="n.id">{{n.name}}</option>
                            </select>
                        </td>
                        <td width="20%" align="center"><strong>走访日期:</strong></td>
                        <td colspan="3" width="25%" align="left">
                            <input id="date" name="date1" placeholder="请选择日期" style="width: 150px; height: 30px"
                                   class="laydate-icon" onclick="laydate()"/>
                        </td>
                    </tr>
                    <tr>
                        <td width="20%" align="center"><strong>走访场所:</strong></td>
                        <td colspan="5"><textarea name="place" rows="2" cols="70"></textarea></td>
                    </tr>
                    <tr>
                        <td width="20%" align="center"><strong>走访状态:</strong></td>
                        <td colspan="5"><textarea name="state" rows="2" cols="70"></textarea></td>
                    </tr>
                    <tr>
                        <td width="20%" align="center"><strong>走访事由:</strong></td>
                        <td colspan="5"><textarea id="reason" name="reason" rows="2" cols="70"></textarea></td>
                    </tr>
                    <tr>
                        <td width="20%" align="center"><strong>走访内容:</strong></td>
                        <td colspan="5"><textarea id="content" name="content" rows="2" cols="70"></textarea></td>
                    </tr>
                </table>
            </form>
        </td>
    </tr>
</table>
<script type="text/javascript">
    var app1 = new Vue({
        el: '#app1',
        data: {
            result: [],
            result1: []
        }
    });
    //根据司法所id查询所有工作人员及矫正人员
    var changeDept = function () {
        //alert($("#job").val());
        $.ajax({
            url: "/interview/getByIdP",
            type: "post",
            dataType: "json",
            data: {
                id: $("#job").val()
            },
            success: function (msg) {
                app1.result = msg.data;
            }
        });
        $.ajax({
            url: "/movePersonel/getAllCorrectedPerson",
            data: {
                id: $('#job').val()
            },
            success: function (msg1) {
                app1.result1 = msg1.data;
            }
        });
    }

</script>
</body>
</html>